{% extends "base.html" %}

{% block content %}
<div id="admintable">
<a href="/editdiscussion">Add New Discussion</a>
    <table>
        <tr class="table_header"><td>Type</td><td>Title</td><td>Topics</td><td>Comments</td><td>Enabled?</td></tr>
{% for listmember in discussiontypelist %}
        {% for discussion in listmember %}
            <tr class="table_row"><td>{{ discussion.type }}</td>
                <td><a href="/editdiscussion?key={{ discussion.key }}">{{ discussion.title }}</a></td>
            <td>{{ discussion.topiccount }}</td><td>{{ discussion.commentcount }}</td>
            <td>{% if discussion.enabled %}Yes{% else %}No{% endif %}</td>
            </tr>
        {% endfor %}
{% endfor %}
    </table>
</div>
{% endblock %}